// 导入创建应用实例的方法
import { createApp } from "vue";
// 导入状态管理工具
import pinia from "@/stores/index.js";

// 导入根组件
import App from "./App.vue";

// 导入插件
import router from "./router/index.js";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "@/assets/public.css";

import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 创建应用
const app = createApp(App);

// 执行全局注册
app.use(pinia);
app.use(router);
app.use(ElementPlus);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component);
}

// 挂载应用
app.mount("#app");
